import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class MovieScroll extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(        
        child: Container(
          height: 238,
          // 一个多行排列的组件，可以实现滚动效果
          child: ListView(
            scrollDirection: Axis.horizontal,
            children: <Widget>[
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.green),
              ),
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.blue),
              ),
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.pink),
              ),
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.yellow),
              ),
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.red),
              ),
              Container(
                width: 170,
                decoration: BoxDecoration(color: Colors.orange),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
